package com.beaut.project.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

@Repository
public interface XMFinanceMapper {

		public void addXMInvoice(Map<String,Object> map);
		public void addXMEndInvoice(Map<String,Object> map);
		public void addXMReimLoan(Map<String,Object> map);
		public void updateXMReimLoan(Map<String,Object> map);
		public void updateXMInvoice(Map<String,Object> map);
		public void updateXMEndInvoice(Map<String,Object> map);
		public void updateXmRecFlag(Map<String,Object> map);
		public  void addXMInvoiceDetail(List<Map<String,Object>> list);
		public  void updateXmInvoiceTicket(Map<String,Object> map);
		public List<Map<String,Object>> listPageXMInvoice(Map<String,Object> map);
		public List<Map<String,Object>> listFinanceInfoByYear(Map<String,Object> map);
		public List<Map<String,Object>> listPageXMRecInvoice(Map<String,Object> map);
		public List<Map<String,Object>> listPageXMRpLoan(Map<String,Object> map);
		public List<Map<String,Object>> listFbAdvances(Map<String,Object> map);
		public List<Map<String,Object>> listPageXMReimbursement(Map<String,Object> map);
		public List<Map<String,Object>> getGdLoanByBzId(Map<String,Object> map);
		public  Map<String,Object>  getReimLoanById(Map<String,Object> map);
		public  Map<String,Object>  getGdAdvancesMoneyById(Map<String,Object> map);
		public  Map<String,Object>  getXMInvoiceById(Map<String,Object> map);
		public  Object  getWorkerInvoiceById(Map<String,Object> map);
		public List<Map<String,Object>> getXMWorkersInvoiceById(Map<String,Object> map);
		public List<Map<String,Object>> getXMSupWorkersInvoiceById(Map<String,Object> map);
		
		public void deleteReimLoan(Map<String,Object> map);
		public void deleteInvoice(Map<String,Object> map);
		public void deleteInvoiceDetail(Map<String,Object> map);
		
		public List<Map<String,Object>> listPageXMInMoney(Map<String,Object> map);
		public void addXMInMoney(Map<String,Object> map);
		public void updateXMInMoney(Map<String,Object> map);
		public  Map<String,Object>  getInMoneyById(Map<String,Object> map);
		public  Map<String,Object>  getXmRecInvoiceById(Map<String,Object> map);
		//票据添加已收
		public  void addXMInvoiceHashReceivable(Map<String,Object> map);
		public  void updateXMInvoiceWarranty(Map<String,Object> map);
		public void deleteInMoney(Map<String,Object> map);
		public void deleteWarranty(Map<String,Object> map);
		//项目支付
		public List<Map<String,Object>> listPageXMPayment(Map<String,Object> map);
		//项目结算支付
		public List<Map<String,Object>> listPageXMEndPayment(Map<String,Object> map);

		//选择供应商
		public List<Map<String,Object>> listXMSuppliers(Map<String,Object> map);
		//选择施工队
		public List<Map<String,Object>> listXMWorkers(Map<String,Object> map);
		//分包商借款金额
		public Map<String,Object> getWorkLoanMoneyById(Map<String,Object> map); 
		//供应商工单应付
		public List<Map<String,Object>> listXMGDSupplyPayment(Map<String,Object> map);
		//施工方工单应付
		public List<Map<String,Object>> listXMGDWorkerPayment(Map<String,Object> map);
		
		public void deleteReimbursement(Map<String,Object> map);
		public void deleteRecInvoice(Map<String,Object> map);
		public List<Map<String,Object>> listGdLoanByXmId(Map<String,Object> map);
		public List<Map<String,Object>> listPageXmReim(Map<String,Object> map);
		public List<Map<String,Object>> getXmReim(Map<String,Object> map);
		public List<Map<String,Object>> getTempXmByRemId(Map<String,Object> map);
		public  Map<String,Object>  getReimbursementById(Map<String,Object> map);
		public  List<Map<String,Object>>  getXmRemLoanById(Map<String,Object> map);
		public  void deleteTempXmBz(Map<String,Object> list);
		public  void addXmBzTmp(List<Map<String,String>> list);
		public  void addXMReimbursement(Map<String,Object> map);
		public  void addXMRecInvoice(Map<String,Object> map);
		public  void updateXMReimbursement(Map<String,Object> map);
		public  void updateXMRecInvoice(Map<String,Object> map);
		public  void updateXmRemLoan(Map<String,Object> map);
		public  void updateXmRem(Map<String,Object> map);
		public  void updateXmRemDetail(Map<String,Object> map);
		//供应商工单应付支付申请（施工队支付操作共享支付表）
		public void addXMGDSupplyWorkerPayment(Map<String,Object> map);
		public  void addXMGDSupplyWorkerPaymentDetail(List<Map<String,Object>> list);
		public  void updateSupplierFinanceOutDetailList(List<Map<String,Object>> list);
		public  void updateSupplierFinanceOutDetail(Map<String,Object> map);
		public void updateXMGDSupplyPayment(Map<String,Object> map);
		
		//供应商工单支付申请
		public Map<String,Object>  viewXmPay(Map<String,Object> map);
		public  List<Map<String,Object>> viewXmPayDetail(Map<String,Object> map);
		//施工方工单支付申请
		public  List<Map<String,Object>> viewXmPayWorkerDetail(Map<String,Object> map);
		//删除支付申请单
		public void deleteXMPayment(Map<String,Object> map);
		public void deleteXMPaymentDetail(Map<String,Object> map);
		//更新supplier_finance_out_detail
		public void updateXMSupplierFinance(Map<String,Object> map);
		//更新supplier
		public void updateSupplier(Map<String,Object> map);
		public Map<String,Object>  getSupplierFOD(Map<String,Object> map);
		public void addXMSupplierFinanceLog(Map<String,Object> map);
		//插入或者更新gd_worker_finance_out_detail
		public void updateXMWorkerFinance(Map<String,Object> map);
		public void updateXMWorkerFin(Map<String,Object> map);
		public void addXMWorkerFinance(Map<String,Object> map);
		public int hasXMWorkerFinance(Map<String,Object> map);
		public void addXMWorkerFinanceLog(Map<String,Object> map);
		
		//查看财务未办项目支付
		public List<Map<String,Object>> listPageXMFinancePayment(Map<String,Object> map);
		public List<Map<String,Object>> getXMFinancePayment();
		//查看财务已办项目支付
		public List<Map<String,Object>> listPageXMFinanceFinishPayment(Map<String,Object> map);
		
		//更新项目支付财务引用ID
//		public void addFinLogIdSupFinanceLog(Map<String,Object> map);
//		public void addFinLogIdWorkerFinanceLog(Map<String,Object> map);
		public void addFinLogIdXMPay(Map<String,Object> map);
		
		
		//查看财务未办项目收款
		public List<Map<String,Object>> listPageXMFinanceEarn(Map<String,Object> map);
		public List<Map<String,Object>> getXMFinanceEarn();
		//查看财务已办项目收款
		public List<Map<String,Object>> listPageXMFinanceFinishEarn(Map<String,Object> map);
		//更新项目收款财务引用ID
		public void addFinLogIdXMInMoney(Map<String,Object> map);
		

		//项目各项金额数量增减
		//已付采购款增加
		public void addXMPurchaseHasPayable(Map<String,Object> map);
		//施工方已收票,项目已开票
		public void addXMOutAndWorkInInvoice(Map<String,Object> map);
		//已付施工款增加
		public void addXMWorkerHasPayable(Map<String,Object> map);
		
		//查看项目结算开票记录
		public List<Map<String,Object>> listXMInvoiceByXMId(Map<String,Object> map);
		
		public int hasXMEndInMoney(Map<String,Object> map);
		public void addXMEndInMoney(Map<String,Object> map);
		public void updateXMEndInMoney(Map<String,Object> map);
		public void deleteXMEndInMoney(Map<String,Object> map);
		public void addXMEndInMoneyDetail(Map<String,Object> map);
		public List<Map<String,Object>> listXMEndInMoneyDetail(Map<String,Object> map);
		public void deleteXMEndInMoneyDetail(Map<String,Object> map);
		//质保金模块
		public void updateXMEndInMoneyWarranty(Map<String,Object> map);
		public void addXMEndInMoneyWarranty(Map<String,Object> map);
		public List<Map<String,Object>> listPageXMWarranty(Map<String,Object> map);
		
		public void addXMPayFbTemp(Map<String,Object> map);
		public void updateXMPayFbTemp(Map<String,Object> map);
		public int hasXMPayFbTemp(Map<String,Object> map);
		 /**
	     * 项目结算采购商结算
	     */
		public  List<Map<String,Object>> getXMPurchaseBalanceByXMId(Map<String,Object> map);
		
		public  List<Map<String,Object>> listXMWorkersBalanceByXMId(Map<String,Object> map);
		
		public int hasXMEndPayMain(Map<String,Object> map);
		public  List<Map<String,Object>> listXmEndCgPayment(Map<String,Object> map);
		public  List<Map<String,Object>> listXmEndFbPayment(Map<String,Object> map);
		/**
		 * 结算账务进行分包支付
		 * @param map
		 * @return
		 */
		public  List<Map<String,Object>> listFBEndPayByXMIdAndWorkerId(Map<String,Object> map);
		/**
		 * 结算账务进行采购支付
		 * @param map
		 * @return
		 */
		public  List<Map<String,Object>> listCGEndPayByXMIdAndsupplierId(Map<String,Object> map);
		public void addXmEndCgPayment(Map<String,Object> map);
		public void addXmEndFbPayment(Map<String,Object> map);
		public void addXMEndPayMain(Map<String,Object> map);
		public void deleteXmEndPayMain(Map<String,Object> map);
		public void deleteXmEndFbPayment(Map<String,Object> map);
		public void deleteXmEndCgPayment(Map<String,Object> map);
		public Map<String,Object>  getXmEndPayMain(Map<String,Object> map);
		
		//更新票号
		public void updateInvoiceCode(Map<String,Object> map);
		//质保金
		public void updateWarranty(Map<String,Object> map);
		public  Map<String,Object>  getWarrantyById(Map<String,Object> map);
		public  List<Map<String,Object>>  listGdAdvancesByVoucherId(Map<String,Object> map);
//		public void updateAlreadyWarranty(Map<String,Object> map);
		//判断是否结算完成，施工与采购款的支付终结
		public int hasEndWorkerPay(Map<String,Object> map);
		public int hasEndSupplyPay(Map<String,Object> map);
		
		public List<Map<String,Object>> listEmployee (Map<String,Object> map);
		public void updateEmployee(List<Map<String,Object>> map);
		
		public Map<String,Object> getEmloyeeReimbursemById(Map<String,Object> map);
		void updateEmployeeReimbursement(Map<String,Object> map);
		
		public List<Map<String,Object>> listEmployeeLoan(Map<String,Object>map);
		public void updateEmployeeLoan(List<Map<String,Object>> list);
		public void updateWorkLoan(List<Map<String,Object>> list);
		public List<Map<String,Object>> listWorkerLoan(Map<String,Object> map);
		public Map<String,Object> getLastWorkerLoan(Map<String,Object> map);
		
}
